import axios from 'axios'
// export const getPerson = (payload) => ({ type: 'getPerson', payload })

export const getPerson = () => async ( dispatch ) => {
  const persons = await axios.get('http://localhost:3000/api/user.json').then(response => response.data)
  dispatch({ type: 'loadPersonSuccess', payload: persons})
}
